//This is a cmocean colormap
//All credit to Kristen Thyng
//This colormap is under the MIT License
//All cmocean colormaps are available at https://github.com/matplotlib/cmocean/tree/master/cmocean/rgb

namespace ScottPlot.Colormaps;

public class Delta : IColormap
{
    public string Name => "Delta";
    readonly CustomPalette Colormap;
    public Color GetColor(double position) => Colormap.GetColor(position);

    public Delta()
    {

        Color[] colors =
        [
            new( 17, 32, 64 ),
            new( 18, 33, 67 ),
            new( 20, 34, 70 ),
            new( 21, 36, 73 ),
            new( 22, 37, 76 ),
            new( 23, 38, 79 ),
            new( 25, 40, 83 ),
            new( 26, 41, 86 ),
            new( 27, 42, 89 ),
            new( 28, 44, 93 ),
            new( 30, 45, 96 ),
            new( 31, 46, 100 ),
            new( 32, 48, 103 ),
            new( 33, 49, 107 ),
            new( 34, 50, 111 ),
            new( 35, 51, 114 ),
            new( 36, 53, 118 ),
            new( 37, 54, 122 ),
            new( 37, 55, 126 ),
            new( 38, 56, 130 ),
            new( 38, 58, 134 ),
            new( 39, 59, 137 ),
            new( 39, 61, 141 ),
            new( 38, 62, 145 ),
            new( 37, 64, 148 ),
            new( 36, 66, 150 ),
            new( 35, 68, 152 ),
            new( 33, 70, 154 ),
            new( 32, 73, 155 ),
            new( 31, 75, 155 ),
            new( 30, 77, 156 ),
            new( 29, 79, 156 ),
            new( 28, 82, 157 ),
            new( 28, 84, 157 ),
            new( 27, 86, 157 ),
            new( 27, 88, 158 ),
            new( 27, 90, 158 ),
            new( 27, 92, 158 ),
            new( 27, 94, 159 ),
            new( 27, 96, 159 ),
            new( 27, 98, 159 ),
            new( 27, 100, 159 ),
            new( 28, 102, 160 ),
            new( 28, 104, 160 ),
            new( 29, 106, 160 ),
            new( 30, 108, 161 ),
            new( 30, 110, 161 ),
            new( 31, 112, 162 ),
            new( 32, 114, 162 ),
            new( 33, 116, 162 ),
            new( 34, 118, 163 ),
            new( 35, 120, 163 ),
            new( 36, 122, 164 ),
            new( 37, 124, 164 ),
            new( 38, 126, 165 ),
            new( 39, 128, 165 ),
            new( 40, 129, 165 ),
            new( 42, 131, 166 ),
            new( 43, 133, 166 ),
            new( 44, 135, 167 ),
            new( 45, 137, 167 ),
            new( 47, 139, 168 ),
            new( 48, 141, 168 ),
            new( 50, 143, 169 ),
            new( 51, 145, 169 ),
            new( 53, 146, 170 ),
            new( 54, 148, 170 ),
            new( 56, 150, 171 ),
            new( 58, 152, 171 ),
            new( 60, 154, 172 ),
            new( 62, 156, 172 ),
            new( 64, 158, 173 ),
            new( 66, 160, 173 ),
            new( 68, 161, 174 ),
            new( 71, 163, 174 ),
            new( 73, 165, 174 ),
            new( 76, 167, 175 ),
            new( 79, 169, 175 ),
            new( 82, 170, 176 ),
            new( 86, 172, 176 ),
            new( 89, 174, 176 ),
            new( 93, 175, 177 ),
            new( 96, 177, 177 ),
            new( 100, 178, 178 ),
            new( 104, 180, 178 ),
            new( 108, 181, 179 ),
            new( 112, 183, 180 ),
            new( 116, 184, 181 ),
            new( 120, 186, 181 ),
            new( 124, 187, 182 ),
            new( 128, 189, 183 ),
            new( 132, 190, 184 ),
            new( 136, 191, 185 ),
            new( 139, 193, 186 ),
            new( 143, 194, 187 ),
            new( 147, 196, 189 ),
            new( 151, 197, 190 ),
            new( 154, 199, 191 ),
            new( 158, 200, 192 ),
            new( 161, 202, 194 ),
            new( 165, 203, 195 ),
            new( 168, 205, 196 ),
            new( 172, 206, 198 ),
            new( 175, 208, 199 ),
            new( 179, 209, 200 ),
            new( 182, 211, 202 ),
            new( 185, 212, 203 ),
            new( 189, 214, 205 ),
            new( 192, 216, 206 ),
            new( 195, 217, 208 ),
            new( 198, 219, 209 ),
            new( 202, 221, 211 ),
            new( 205, 222, 212 ),
            new( 208, 224, 213 ),
            new( 211, 226, 215 ),
            new( 214, 227, 216 ),
            new( 217, 229, 218 ),
            new( 220, 231, 219 ),
            new( 223, 233, 220 ),
            new( 227, 235, 222 ),
            new( 230, 237, 223 ),
            new( 233, 238, 224 ),
            new( 236, 240, 225 ),
            new( 239, 242, 226 ),
            new( 242, 244, 227 ),
            new( 246, 246, 228 ),
            new( 249, 248, 229 ),
            new( 252, 250, 230 ),
            new( 255, 253, 205 ),
            new( 254, 250, 201 ),
            new( 252, 248, 197 ),
            new( 251, 246, 192 ),
            new( 249, 243, 188 ),
            new( 248, 241, 184 ),
            new( 247, 238, 180 ),
            new( 246, 236, 175 ),
            new( 244, 234, 171 ),
            new( 243, 231, 167 ),
            new( 241, 229, 162 ),
            new( 240, 227, 158 ),
            new( 239, 225, 154 ),
            new( 237, 222, 150 ),
            new( 236, 220, 145 ),
            new( 234, 218, 141 ),
            new( 233, 216, 137 ),
            new( 231, 214, 132 ),
            new( 230, 212, 128 ),
            new( 228, 210, 123 ),
            new( 227, 207, 119 ),
            new( 225, 205, 115 ),
            new( 223, 204, 110 ),
            new( 221, 202, 106 ),
            new( 219, 200, 102 ),
            new( 217, 198, 97 ),
            new( 215, 196, 93 ),
            new( 213, 194, 89 ),
            new( 211, 193, 85 ),
            new( 209, 191, 81 ),
            new( 206, 189, 76 ),
            new( 204, 188, 72 ),
            new( 201, 186, 69 ),
            new( 199, 185, 65 ),
            new( 196, 183, 61 ),
            new( 193, 182, 57 ),
            new( 190, 180, 54 ),
            new( 187, 179, 50 ),
            new( 184, 178, 47 ),
            new( 181, 176, 43 ),
            new( 178, 175, 40 ),
            new( 175, 174, 37 ),
            new( 172, 173, 34 ),
            new( 169, 171, 31 ),
            new( 165, 170, 28 ),
            new( 162, 169, 25 ),
            new( 159, 168, 23 ),
            new( 155, 166, 20 ),
            new( 152, 165, 18 ),
            new( 149, 164, 15 ),
            new( 145, 163, 13 ),
            new( 142, 162, 11 ),
            new( 138, 160, 9 ),
            new( 135, 159, 8 ),
            new( 131, 158, 7 ),
            new( 128, 157, 6 ),
            new( 124, 156, 6 ),
            new( 121, 154, 6 ),
            new( 117, 153, 6 ),
            new( 113, 152, 6 ),
            new( 110, 151, 7 ),
            new( 106, 149, 8 ),
            new( 102, 148, 9 ),
            new( 99, 147, 11 ),
            new( 95, 146, 12 ),
            new( 92, 144, 14 ),
            new( 88, 143, 15 ),
            new( 84, 142, 17 ),
            new( 81, 140, 18 ),
            new( 77, 139, 20 ),
            new( 73, 138, 22 ),
            new( 70, 136, 23 ),
            new( 66, 135, 25 ),
            new( 63, 133, 26 ),
            new( 59, 132, 28 ),
            new( 56, 131, 29 ),
            new( 52, 129, 30 ),
            new( 49, 127, 32 ),
            new( 45, 126, 33 ),
            new( 42, 124, 34 ),
            new( 39, 123, 35 ),
            new( 36, 121, 36 ),
            new( 33, 120, 37 ),
            new( 30, 118, 38 ),
            new( 27, 116, 39 ),
            new( 24, 115, 40 ),
            new( 22, 113, 41 ),
            new( 19, 111, 41 ),
            new( 17, 109, 42 ),
            new( 15, 108, 43 ),
            new( 14, 106, 43 ),
            new( 13, 104, 43 ),
            new( 12, 102, 44 ),
            new( 11, 100, 44 ),
            new( 11, 99, 44 ),
            new( 11, 97, 45 ),
            new( 11, 95, 45 ),
            new( 12, 93, 45 ),
            new( 12, 91, 45 ),
            new( 13, 89, 45 ),
            new( 14, 87, 45 ),
            new( 15, 85, 44 ),
            new( 16, 84, 44 ),
            new( 17, 82, 44 ),
            new( 18, 80, 43 ),
            new( 19, 78, 43 ),
            new( 20, 76, 42 ),
            new( 20, 74, 42 ),
            new( 21, 72, 41 ),
            new( 22, 70, 41 ),
            new( 23, 68, 40 ),
            new( 23, 66, 39 ),
            new( 24, 64, 38 ),
            new( 24, 63, 37 ),
            new( 25, 61, 36 ),
            new( 25, 59, 35 ),
            new( 25, 57, 34 ),
            new( 25, 55, 33 ),
            new( 25, 53, 32 ),
            new( 25, 51, 31 ),
            new( 25, 49, 30 ),
            new( 25, 47, 28 ),
            new( 25, 45, 27 ),
            new( 25, 44, 25 ),
            new( 25, 42, 24 ),
            new( 24, 40, 23 ),
            new( 24, 38, 21 ),
            new( 23, 36, 19 ),
        ];

        Colormap = new CustomPalette(colors);
    }
}

